#ifndef RAY_H
#define RAY_H
#include<QVector3D>

class ray
{
public:
    ray();
    ray(const QVector3D&a,const QVector3D&b,float ti=0.0)
    {
        A=a;
        B=b;
        _time=ti;
    }
    QVector3D origin()const{return A;}
    QVector3D direction()const{return B;}
    QVector3D point_at_parameter(float t)const{return A+t*B;}
    QVector3D A;
    QVector3D B;
    float _time;
    float time()const{return _time;}
};

#endif // RAY_H
